package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.PlanCollectingEntityMapper;
import com.ly.heart.domain.PlanCollectingEntity;
import com.ly.heart.service.IPlanCollectingEntityService;

/**
 * 回款计划，走审批Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class PlanCollectingEntityServiceImpl implements IPlanCollectingEntityService
{
    @Autowired
    private PlanCollectingEntityMapper planCollectingEntityMapper;

    /**
     * 查询回款计划，走审批
     *
     * @param id 回款计划，走审批主键
     * @return 回款计划，走审批
     */
    @Override
    public PlanCollectingEntity selectPlanCollectingEntityById(String id)
    {
        return planCollectingEntityMapper.selectPlanCollectingEntityById(id);
    }

    /**
     * 查询回款计划，走审批列表
     *
     * @param planCollectingEntity 回款计划，走审批
     * @return 回款计划，走审批
     */
    @Override
    public List<PlanCollectingEntity> selectPlanCollectingEntityList(PlanCollectingEntity planCollectingEntity)
    {
        return planCollectingEntityMapper.selectPlanCollectingEntityList(planCollectingEntity);
    }

    /**
     * 新增回款计划，走审批
     *
     * @param planCollectingEntity 回款计划，走审批
     * @return 结果
     */
    @Override
    public int insertPlanCollectingEntity(PlanCollectingEntity planCollectingEntity)
    {
        planCollectingEntity.setCreateTime(DateUtils.getNowDate());
        return planCollectingEntityMapper.insertPlanCollectingEntity(planCollectingEntity);
    }

    /**
     * 修改回款计划，走审批
     *
     * @param planCollectingEntity 回款计划，走审批
     * @return 结果
     */
    @Override
    public int updatePlanCollectingEntity(PlanCollectingEntity planCollectingEntity)
    {
        return planCollectingEntityMapper.updatePlanCollectingEntity(planCollectingEntity);
    }

    /**
     * 批量删除回款计划，走审批
     *
     * @param ids 需要删除的回款计划，走审批主键
     * @return 结果
     */
    @Override
    public int deletePlanCollectingEntityByIds(String[] ids)
    {
        return planCollectingEntityMapper.deletePlanCollectingEntityByIds(ids);
    }

    /**
     * 删除回款计划，走审批信息
     *
     * @param id 回款计划，走审批主键
     * @return 结果
     */
    @Override
    public int deletePlanCollectingEntityById(String id)
    {
        return planCollectingEntityMapper.deletePlanCollectingEntityById(id);
    }
}
